package com.yupi.springbootinit.model.dto.production.printingrecord;

import jakarta.validation.constraints.*;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDateTime;


/**
 * @Author:WwW
 * @Description
 * @Date: 2025/9/22  16:30
 */
@Data
public class PrintingRecordAddRequest {


    /**
     * 流程卡号
     */
    @Size(max = 64, message = "流程卡号不能超过64个字符")
    private String recordNo;

    /**
     * 产品名称
     */
    @Size(max = 200, message = "产品名称不能超过200个字符")
    private String productName;

    private String deviceName;

    /**
     * 开始时间
     */
    private LocalDateTime startTime;

    /**
     * 结束时间
     */
    private LocalDateTime endTime;

    /**
     * 工时（分钟）
     */
    @Min(value = 0, message = "工时不能为负")
    private Integer durationMinutes;

    /**
     * 打印数量
     */
    @Min(value = 0, message = "打印数量不能为负")
    private Integer printQty;

    @Size(max = 128, message = "材料牌号不能超过128个字符")
    private String materialBrand;

    @Size(max = 128, message = "供应商名称不能超过128个字符")
    private String supplierName;

    @Size(max = 64, message = "材料批次不能超过64个字符")
    private String materialLot;

    @DecimalMin(value = "0.0", message = "流速值不能为负")
    private BigDecimal flowRateValue;

    @Size(max = 32, message = "流速单位不能超过32个字符")
    private String flowRateUnit;

    @DecimalMin(value = "0.0", message = "投入重量不能为负")
    private BigDecimal inputGrams;

    @DecimalMin(value = "0.0", message = "清出重量不能为负")
    private BigDecimal cleanoutGrams;

    @DecimalMin(value = "0.0", message = "风机粉重量不能为负")
    private BigDecimal fanPowderGrams;

    @DecimalMin(value = "0.0", message = "打印前基板重量不能为负")
    private BigDecimal baseWeightBeforeGrams;

    @DecimalMin(value = "0.0", message = "打印后基板重量不能为负")
    private BigDecimal baseWeightAfterGrams;

    @Min(value = 0, message = "报废数量不能为负")
    private Integer scrapQty;

    @DecimalMin(value = "0.0", message = "报废重量不能为负")
    private BigDecimal scrapWeightGrams;

    private Long unloadOperatorId;

    @Size(max = 64, message = "下机操作人姓名不能超过64个字符")
    private String unloadOperatorName;

    @Size(max = 500, message = "备注不能超过500个字符")
    private String remark;

    private static final long serialVersionUID = 1L;
}